<!DOCTYPE html>
<html lang="zh-CN">
<head>
  <meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=2">
<meta name="theme-color" content="#222">
<meta name="generator" content="Hexo 5.4.2">
  <link rel="apple-touch-icon" sizes="180x180" href="/images/apple-touch-icon-next.png">
  <link rel="icon" type="image/png" sizes="32x32" href="/images/favicon-32x32-next.png">
  <link rel="icon" type="image/png" sizes="16x16" href="/images/favicon-16x16-next.png">
  <link rel="mask-icon" href="/images/logo.svg" color="#222">

<link rel="stylesheet" href="/css/main.css">


<link rel="stylesheet" href="/lib/font-awesome/css/all.min.css">

<script id="hexo-configurations">
    var NexT = window.NexT || {};
    var CONFIG = {"hostname":"example.com","root":"/","scheme":"Pisces","version":"7.8.0","exturl":true,"sidebar":{"position":"left","display":"post","padding":18,"offset":12,"onmobile":false},"copycode":{"enable":false,"show_result":false,"style":null},"back2top":{"enable":true,"sidebar":false,"scrollpercent":false},"bookmark":{"enable":false,"color":"#222","save":"auto"},"fancybox":false,"mediumzoom":false,"lazyload":false,"pangu":false,"comments":{"style":"tabs","active":null,"storage":true,"lazyload":false,"nav":null},"algolia":{"hits":{"per_page":10},"labels":{"input_placeholder":"Search for Posts","hits_empty":"We didn't find any results for the search: ${query}","hits_stats":"${hits} results found in ${time} ms"}},"localsearch":{"enable":false,"trigger":"auto","top_n_per_article":1,"unescape":false,"preload":false},"motion":{"enable":true,"async":false,"transition":{"post_block":"fadeIn","post_header":"slideDownIn","post_body":"slideDownIn","coll_header":"slideLeftIn","sidebar":"slideUpIn"}}};
  </script>

  <meta name="description" content="两种方法是先对码云的模拟登陆 1、使用cookies发起request请求。 ‘’’功能：带入cookies模拟gitee用户登录实现：重写strart_request方法，再就是把请求cookies转成字典scrapy startproject giteescrapy genspider git1 gitee.com‘’’ import scrapy class Git1Spider(scra">
<meta property="og:type" content="article">
<meta property="og:title" content="码云模拟登陆">
<meta property="og:url" content="http://example.com/2022/05/11/Simulation_on/index.html">
<meta property="og:site_name" content="Hexo">
<meta property="og:description" content="两种方法是先对码云的模拟登陆 1、使用cookies发起request请求。 ‘’’功能：带入cookies模拟gitee用户登录实现：重写strart_request方法，再就是把请求cookies转成字典scrapy startproject giteescrapy genspider git1 gitee.com‘’’ import scrapy class Git1Spider(scra">
<meta property="og:locale" content="zh_CN">
<meta property="og:image" content="http://example.com/images/%E6%9B%B9%E5%A9%89%E7%91%BE%20%E9%97%AD%E7%9C%BC%20%E5%85%A5%E7%9D%A14k%E7%BE%8E%E5%A5%B3%E5%A3%81%E7%BA%B8.jpg">
<meta property="article:published_time" content="2022-05-11T14:39:04.000Z">
<meta property="article:modified_time" content="2022-05-11T14:17:04.076Z">
<meta property="article:author" content="YTNetMan">
<meta property="article:tag" content="Gitee GIT MongoDB   Swarl Django Next  Office   HEXO   Python">
<meta name="twitter:card" content="summary">
<meta name="twitter:image" content="http://example.com/images/%E6%9B%B9%E5%A9%89%E7%91%BE%20%E9%97%AD%E7%9C%BC%20%E5%85%A5%E7%9D%A14k%E7%BE%8E%E5%A5%B3%E5%A3%81%E7%BA%B8.jpg">

<link rel="canonical" href="http://example.com/2022/05/11/Simulation_on/">


<script id="page-configurations">
  // https://hexo.io/docs/variables.html
  CONFIG.page = {
    sidebar: "",
    isHome : false,
    isPost : true,
    lang   : 'zh-CN'
  };
</script>

  <title>码云模拟登陆 | Hexo</title>
  






  <noscript>
  <style>
  .use-motion .brand,
  .use-motion .menu-item,
  .sidebar-inner,
  .use-motion .post-block,
  .use-motion .pagination,
  .use-motion .comments,
  .use-motion .post-header,
  .use-motion .post-body,
  .use-motion .collection-header { opacity: initial; }

  .use-motion .site-title,
  .use-motion .site-subtitle {
    opacity: initial;
    top: initial;
  }

  .use-motion .logo-line-before i { left: initial; }
  .use-motion .logo-line-after i { right: initial; }
  </style>
</noscript>

</head>

<body itemscope itemtype="http://schema.org/WebPage">
  <div class="container use-motion">
    <div class="headband"></div>

    <header class="header" itemscope itemtype="http://schema.org/WPHeader">
      <div class="header-inner"><div class="site-brand-container">
  <div class="site-nav-toggle">
    <div class="toggle" aria-label="切换导航栏">
      <span class="toggle-line toggle-line-first"></span>
      <span class="toggle-line toggle-line-middle"></span>
      <span class="toggle-line toggle-line-last"></span>
    </div>
  </div>

  <div class="site-meta">

    <a href="/" class="brand" rel="start">
      <span class="logo-line-before"><i></i></span>
      <h1 class="site-title">Hexo</h1>
      <span class="logo-line-after"><i></i></span>
    </a>
  </div>

  <div class="site-nav-right">
    <div class="toggle popup-trigger">
    </div>
  </div>
</div>




<nav class="site-nav">
  <ul id="menu" class="main-menu menu">
        <li class="menu-item menu-item-home">

    <a href="/" rel="section"><i class="fa fa-home fa-fw"></i>首页</a>

  </li>
        <li class="menu-item menu-item-about">

    <a href="/about/" rel="section"><i class="fa fa-user fa-fw"></i>关于</a>

  </li>
        <li class="menu-item menu-item-tags">

    <a href="/tags/" rel="section"><i class="fa fa-tags fa-fw"></i>标签</a>

  </li>
        <li class="menu-item menu-item-categories">

    <a href="/categories/" rel="section"><i class="fa fa-th fa-fw"></i>分类</a>

  </li>
        <li class="menu-item menu-item-archives">

    <a href="/archives/" rel="section"><i class="fa fa-archive fa-fw"></i>归档</a>

  </li>
        <li class="menu-item menu-item-schedule">

    <a href="/schedule/" rel="section"><i class="fa fa-calendar fa-fw"></i>日程表</a>

  </li>
        <li class="menu-item menu-item-sitemap">

    <a href="/sitemap.xml" rel="section"><i class="fa fa-sitemap fa-fw"></i>站点地图</a>

  </li>
        <li class="menu-item menu-item-commonweal">

    <a href="/404/" rel="section"><i class="fa fa-heartbeat fa-fw"></i>公益 404</a>

  </li>
  </ul>
</nav>




</div>
    </header>

    
  <div class="back-to-top">
    <i class="fa fa-arrow-up"></i>
    <span>0%</span>
  </div>


    <main class="main">
      <div class="main-inner">
        <div class="content-wrap">
          

          <div class="content post posts-expand">
            

    
  
  
  <article itemscope itemtype="http://schema.org/Article" class="post-block" lang="zh-CN">
    <link itemprop="mainEntityOfPage" href="http://example.com/2022/05/11/Simulation_on/">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="image" content="/images/ylh.jpg">
      <meta itemprop="name" content="YTNetMan">
      <meta itemprop="description" content="">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="Hexo">
    </span>
      <header class="post-header">
        <h1 class="post-title" itemprop="name headline">
          码云模拟登陆
        </h1>

        <div class="post-meta">
            <span class="post-meta-item">
              <span class="post-meta-item-icon">
                <i class="far fa-calendar"></i>
              </span>
              <span class="post-meta-item-text">发表于</span>
              

              <time title="创建时间：2022-05-11 22:39:04 / 修改时间：22:17:04" itemprop="dateCreated datePublished" datetime="2022-05-11T22:39:04+08:00">2022-05-11</time>
            </span>
            <span class="post-meta-item">
              <span class="post-meta-item-icon">
                <i class="far fa-folder"></i>
              </span>
              <span class="post-meta-item-text">分类于</span>
                <span itemprop="about" itemscope itemtype="http://schema.org/Thing">
                  <a href="/categories/%E6%95%99%E7%A8%8B-Python-%E6%95%B0%E6%8D%AE%E5%BA%93-%E7%88%AC%E8%99%AB-WEB-%E6%8A%80%E5%B7%A7-%E6%AF%8F%E6%97%A5%E4%B8%80%E7%BB%83-%E5%8A%9E%E5%85%AC%E8%87%AA%E5%8A%A8%E5%8C%96/" itemprop="url" rel="index"><span itemprop="name">教程  Python    数据库   爬虫   WEB   技巧  每日一练   办公自动化</span></a>
                </span>
            </span>

          
            <span id="/2022/05/11/Simulation_on/" class="post-meta-item leancloud_visitors" data-flag-title="码云模拟登陆" title="阅读次数">
              <span class="post-meta-item-icon">
                <i class="fa fa-eye"></i>
              </span>
              <span class="post-meta-item-text">阅读次数：</span>
              <span class="leancloud-visitors-count"></span>
            </span>
            <span class="post-meta-item" title="阅读次数" id="busuanzi_container_page_pv" style="display: none;">
              <span class="post-meta-item-icon">
                <i class="fa fa-eye"></i>
              </span>
              <span class="post-meta-item-text">阅读次数：</span>
              <span id="busuanzi_value_page_pv"></span>
            </span>

        </div>
      </header>

    
    
    
    <div class="post-body" itemprop="articleBody">

      
        <p><img src="/../images/%E6%9B%B9%E5%A9%89%E7%91%BE%20%E9%97%AD%E7%9C%BC%20%E5%85%A5%E7%9D%A14k%E7%BE%8E%E5%A5%B3%E5%A3%81%E7%BA%B8.jpg"></p>
<p>两种方法是先对码云的模拟登陆</p>
<p>1、使用cookies发起request请求。</p>
<p>‘’’<br>功能：带入cookies模拟gitee用户登录<br>实现：重写strart_request方法，再就是把请求cookies转成字典<br>scrapy startproject gitee<br>scrapy genspider git1 gitee.com<br>‘’’</p>
<p>import scrapy</p>
<p>class Git1Spider(scrapy.Spider):<br>    name = ‘git1’<br>    allowed_domains = [‘gitee.com’]<br>    #更改初始url<br>    start_urls = [‘<span class="exturl" data-url="aHR0cHM6Ly9naXRlZS5jb20vZGFzaGJvYXJkJiMzOTtd">https://gitee.com/dashboard&#39;]<i class="fa fa-external-link-alt"></i></span></p>
<pre><code># 重写strart_request方法，为了带上cookies，进行模拟登陆
</code></pre>
<p>​    def start_requests(self):<br>​        url = self.start_urls[0]<br>​        # chome 的 cookies<br>​        temp = ‘user_locale=zh-CN; oschina_new_user=false; Hm_lvt_24f17767262929947cc3631f99bfd274=1651924151,1651938639,1652058170,1652095402; remote_way=http; sensorsdata2015jssdkcross=%7B%22distinct_id%22%3A%2210894785%22%2C%22first_id%22%3A%22180a88f3d42163-0d9eeb8fe866d28-c555420-2073600-180a88f3d43447%22%2C%22props%22%3A%7B%22%24latest_traffic_source_type%22%3A%22%E7%9B%B4%E6%8E%A5%E6%B5%81%E9%87%8F%22%2C%22%24latest_search_keyword%22%3A%22%E6%9C%AA%E5%8F%96%E5%88%B0%E5%80%BC_%E7%9B%B4%E6%8E%A5%E6%89%93%E5%BC%80%22%2…feb271cbe855a665eecb623d90; gitee_user=true; gitee-session-n=VVIzNUVNWXdYMW9BQ2JDclNsSDlZNjNzQkNQdEhyL2NSelJEeFBlM2lVcVBKTm5GWEFZQ2Q2eW1YRzRuQ05DZFhnajJhaTJSWjFxVG05UWl6aVJOZGUwcVdpMllPaWN4bS9HMDhqM0krM2g4Y3UybDYzSWFPdXpNUmx0V0pqZm5YSk5nNzdKWStQc3F3WDA4UVNySTRVS0dUeWhQR2lLUDgxSUpzMTFkNWZDVW50TFhlUVp4Rmt3RXRMNGdoaTM5cDRsT2x2RGRyUGlZc3ZUazdwaW5sV29FTm1ENXhITlJIRTBMRDZMRzl3RkdJekdNTWtHbUk5K3c3MFhKR1JMUVphUDcxMFI4MTN0Qm12eVVwTm02ZHc9PS0tNnIrZk9WUDREODBHWW8xNFdWNER5dz09–a9c27ad025f6cf98974da39a901e46bc27d8ae7e’<br>​        #新建字典，并进行字符串遍历<br>​        cookies = {data.split(“=”)[0]:data.split(“=”)[-1] for data in temp.split(‘;’)}<br>​        yield scrapy.Request(url = url,callback=self.parse,cookies=cookies)<br>​    def parse(self, response):<br>​        #对网页的title进行爬取<br>​        print(response.xpath(‘/html/head/title/text()’).extract_first())</p>
<p>2、使用post方法抓取表单记录模拟登陆。</p>
<p>‘’’</p>
<p>class Git2Spider(scrapy.Spider):<br>    name = ‘git2’<br>    allowed_domains = [‘gitee.com’]<br>    start_urls = [‘<span class="exturl" data-url="aHR0cHM6Ly9naXRlZS5jb20vbG9naW4mIzM5O10=">https://gitee.com/login&#39;]<i class="fa fa-external-link-alt"></i></span></p>
<pre><code>def parse(self, response):
    #获取token值 需要在表单中查询
    token = response.xpath(&#39;//input[@name = &quot;authenticity_token&quot;]/@value&#39;).extract_first()
    print(token)
    #抓取请求包，把需要的要素拷贝回来
    #火狐-&gt;登录-&gt;f12-&gt;选中form-&gt;在net右侧点0（拦截请求按钮）-&gt;查看请求记录
    post_data = &#123;

        &quot;encrypt_key&quot;: &quot;password&quot;,
        &quot;utf8&quot;: &quot;✓&quot;,
        &quot;authenticity_token&quot;: token,
        &quot;redirect_to_url&quot;: &quot;&quot;,
        &quot;user[login]&quot;: &quot;YTNetMan&quot;,
        &quot;encrypt_data[user[password]]&quot;: &quot;V1JK8Z5Q3m9mex/s+04TQhAHfotECoww9CN1j4pe3097kNeSB6bG2e+uiCu1A12v+HMoWPY747rjZfVQafat37wbm/qsh6WuxumYFjDXX8mZTaEtLUkSGLklSEeJ6+c/LAPzTHzl133KmEjqnX/iNqMFcMSe/Qt0IFIoe4BUYJU=&quot;,
        &quot;user[remember_me]&quot;: [&quot;0&quot;, &quot;1&quot;]
    &#125;
    print(post_data)
    # 发出post请求
    yield scrapy.FormRequest(
        url = &quot;https://gitee.com/login&quot;,callback=self.after_login,formdata=post_data
    )
def after_login(self,response) :
    # dont_filter=True 必须要有，否则出现了重复的链接,重复的请求DEBUG
    yield scrapy.Request(&#39;https://gitee.com/dashboard&#39;,callback=self.check_login,dont_filter=True)
def check_login(selfself,response):
    yield print(response.xpath(&#39;/html/head/title/text()&#39;).extract_first())
</code></pre>
<p>我的码云： <span class="exturl" data-url="aHR0cHM6Ly95dG5ldG1hbi5naXRlZS5pby8=">https://ytnetman.gitee.io<i class="fa fa-external-link-alt"></i></span><br>代码仓库：  <span class="exturl" data-url="aHR0cHM6Ly9naXRlZS5jb20vWVROZXRNYW4veW50">https://gitee.com/YTNetMan/ynt<i class="fa fa-external-link-alt"></i></span><br>邮箱：       <span class="exturl" data-url="bWFpbHRvOiYjeDc5OyYjOTc7JiMxMTA7JiMxMDM7JiN4NzE7JiMxMDU7JiN4Njc7JiN4NzU7JiM5NzsmI3g2ZTsmIzEwMzsmI3g0MDsmIzExMzsmI3g3MTsmIzQ2OyYjeDYzOyYjMTExOyYjeDZkOw==">&#x79;&#97;&#110;&#103;&#x71;&#105;&#x67;&#x75;&#97;&#x6e;&#103;&#x40;&#113;&#x71;&#46;&#x63;&#111;&#x6d;<i class="fa fa-external-link-alt"></i></span></p>

    </div>

    
    
    

      <footer class="post-footer">
          <div class="post-tags">
              <a href="/tags/Gitee-GIT-MongoDB-Swarl-Django-Next-Office-HEXO-Python/" rel="tag"># Gitee GIT MongoDB   Swarl Django Next  Office   HEXO   Python</a>
          </div>

        
  <div class="post-widgets">
    <div class="wp_rating">
      <div id="wpac-rating"></div>
    </div>
  </div>


        
    <div class="post-nav">
      <div class="post-nav-item">
    <a href="/2022/05/11/Typora/" rel="prev" title="Typora最后一个免费版本">
      <i class="fa fa-chevron-left"></i> Typora最后一个免费版本
    </a></div>
      <div class="post-nav-item"></div>
    </div>
      </footer>
    
  </article>
  
  
  



          </div>
          

<script>
  window.addEventListener('tabs:register', () => {
    let { activeClass } = CONFIG.comments;
    if (CONFIG.comments.storage) {
      activeClass = localStorage.getItem('comments_active') || activeClass;
    }
    if (activeClass) {
      let activeTab = document.querySelector(`a[href="#comment-${activeClass}"]`);
      if (activeTab) {
        activeTab.click();
      }
    }
  });
  if (CONFIG.comments.storage) {
    window.addEventListener('tabs:click', event => {
      if (!event.target.matches('.tabs-comment .tab-content .tab-pane')) return;
      let commentClass = event.target.classList[1];
      localStorage.setItem('comments_active', commentClass);
    });
  }
</script>

        </div>
          
  
  <div class="toggle sidebar-toggle">
    <span class="toggle-line toggle-line-first"></span>
    <span class="toggle-line toggle-line-middle"></span>
    <span class="toggle-line toggle-line-last"></span>
  </div>

  <aside class="sidebar">
    <div class="sidebar-inner">

      <ul class="sidebar-nav motion-element">
        <li class="sidebar-nav-toc">
          文章目录
        </li>
        <li class="sidebar-nav-overview">
          站点概览
        </li>
      </ul>

      <!--noindex-->
      <div class="post-toc-wrap sidebar-panel">
      </div>
      <!--/noindex-->

      <div class="site-overview-wrap sidebar-panel">
        <div class="site-author motion-element" itemprop="author" itemscope itemtype="http://schema.org/Person">
    <img class="site-author-image" itemprop="image" alt="YTNetMan"
      src="/images/ylh.jpg">
  <p class="site-author-name" itemprop="name">YTNetMan</p>
  <div class="site-description" itemprop="description"></div>
</div>
<div class="site-state-wrap motion-element">
  <nav class="site-state">
      <div class="site-state-item site-state-posts">
          <a href="/archives/">
        
          <span class="site-state-item-count">7</span>
          <span class="site-state-item-name">日志</span>
        </a>
      </div>
      <div class="site-state-item site-state-categories">
            <a href="/categories/">
          
        <span class="site-state-item-count">4</span>
        <span class="site-state-item-name">分类</span></a>
      </div>
      <div class="site-state-item site-state-tags">
            <a href="/tags/">
          
        <span class="site-state-item-count">4</span>
        <span class="site-state-item-name">标签</span></a>
      </div>
  </nav>
</div>
  <div class="links-of-author motion-element">
      <span class="links-of-author-item">
        <span class="exturl" data-url="aHR0cHM6Ly95dG5ldG1hbi5naXRlZS5pbw==" title="Gitee → https:&#x2F;&#x2F;ytnetman.gitee.io"><i class="fab fa-github fa-fw"></i>Gitee</span>
      </span>
      <span class="links-of-author-item">
        <span class="exturl" data-url="bWFpbHRvOnlhbmdxaWd1YW5nQDE4OS5jbg==" title="E-Mail → mailto:yangqiguang@189.cn"><i class="fa fa-envelope fa-fw"></i>E-Mail</span>
      </span>
      <span class="links-of-author-item">
        <span class="exturl" data-url="aHR0cHM6Ly93ZWliby5jb20veXRuZXRtYW4=" title="Weibo → https:&#x2F;&#x2F;weibo.com&#x2F;ytnetman"><i class="fab fa-weibo fa-fw"></i>Weibo</span>
      </span>
      <span class="links-of-author-item">
        <span class="exturl" data-url="aHR0cHM6Ly9wbHVzLmdvb2dsZS5jb20veXRuZXRtYW4=" title="Google → https:&#x2F;&#x2F;plus.google.com&#x2F;ytnetman"><i class="fab fa-google fa-fw"></i>Google</span>
      </span>
  </div>



      </div>

    </div>
  </aside>
  <div id="sidebar-dimmer"></div>


      </div>
    </main>

    <footer class="footer">
      <div class="footer-inner">
        

        

<div class="copyright">
  
  &copy; 
  <span itemprop="copyrightYear">2022</span>
  <span class="with-love">
    <i class="fa fa-heart"></i>
  </span>
  <span class="author" itemprop="copyrightHolder">YTNetMan</span>
</div>
  <div class="powered-by">由 <span class="exturl theme-link" data-url="aHR0cHM6Ly9oZXhvLmlv">Hexo</span> & <span class="exturl theme-link" data-url="aHR0cHM6Ly9waXNjZXMudGhlbWUtbmV4dC5vcmc=">NexT.Pisces</span> 强力驱动
  </div>

        
<div class="busuanzi-count">
  <script async src="https://busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js"></script>
    <span class="post-meta-item" id="busuanzi_container_site_uv" style="display: none;">
      <span class="post-meta-item-icon">
        <i class="fa fa-user"></i>
      </span>
      <span class="site-uv" title="总访客量">
        <span id="busuanzi_value_site_uv"></span>
      </span>
    </span>
    <span class="post-meta-divider">|</span>
    <span class="post-meta-item" id="busuanzi_container_site_pv" style="display: none;">
      <span class="post-meta-item-icon">
        <i class="fa fa-eye"></i>
      </span>
      <span class="site-pv" title="总访问量">
        <span id="busuanzi_value_site_pv"></span>
      </span>
    </span>
</div>






<script>
  (function() {
    function leancloudSelector(url) {
      url = encodeURI(url);
      return document.getElementById(url).querySelector('.leancloud-visitors-count');
    }

    function addCount(Counter) {
      var visitors = document.querySelector('.leancloud_visitors');
      var url = decodeURI(visitors.id);
      var title = visitors.dataset.flagTitle;

      Counter('get', '/classes/Counter?where=' + encodeURIComponent(JSON.stringify({ url })))
        .then(response => response.json())
        .then(({ results }) => {
          if (results.length > 0) {
            var counter = results[0];
            leancloudSelector(url).innerText = counter.time + 1;
            Counter('put', '/classes/Counter/' + counter.objectId, { time: { '__op': 'Increment', 'amount': 1 } })
              .catch(error => {
                console.error('Failed to save visitor count', error);
              });
          } else {
              leancloudSelector(url).innerText = 'Counter not initialized! More info at console err msg.';
              console.error('ATTENTION! LeanCloud counter has security bug, see how to solve it here: https://github.com/theme-next/hexo-leancloud-counter-security. \n However, you can still use LeanCloud without security, by setting `security` option to `false`.');
            
          }
        })
        .catch(error => {
          console.error('LeanCloud Counter Error', error);
        });
    }

    function showTime(Counter) {
      var visitors = document.querySelectorAll('.leancloud_visitors');
      var entries = [...visitors].map(element => {
        return decodeURI(element.id);
      });

      Counter('get', '/classes/Counter?where=' + encodeURIComponent(JSON.stringify({ url: { '$in': entries } })))
        .then(response => response.json())
        .then(({ results }) => {
          for (let url of entries) {
            let target = results.find(item => item.url === url);
            leancloudSelector(url).innerText = target ? target.time : 0;
          }
        })
        .catch(error => {
          console.error('LeanCloud Counter Error', error);
        });
    }

    let { app_id, app_key, server_url } = {"enable":true,"app_id":null,"app_key":null,"server_url":null,"security":true};
    function fetchData(api_server) {
      var Counter = (method, url, data) => {
        return fetch(`${api_server}/1.1${url}`, {
          method,
          headers: {
            'X-LC-Id'     : app_id,
            'X-LC-Key'    : app_key,
            'Content-Type': 'application/json',
          },
          body: JSON.stringify(data)
        });
      };
      if (CONFIG.page.isPost) {
        if (CONFIG.hostname !== location.hostname) return;
        addCount(Counter);
      } else if (document.querySelectorAll('.post-title-link').length >= 1) {
        showTime(Counter);
      }
    }

    let api_server = app_id.slice(-9) !== '-MdYXbMMI' ? server_url : `https://${app_id.slice(0, 8).toLowerCase()}.api.lncldglobal.com`;

    if (api_server) {
      fetchData(api_server);
    } else {
      fetch('https://app-router.leancloud.cn/2/route?appId=' + app_id)
        .then(response => response.json())
        .then(({ api_server }) => {
          fetchData('https://' + api_server);
        });
    }
  })();
</script>


      </div>
    </footer>
  </div>

  
  <script src="/lib/anime.min.js"></script>
  <script src="/lib/velocity/velocity.min.js"></script>
  <script src="/lib/velocity/velocity.ui.min.js"></script>

<script src="/js/utils.js"></script>

<script src="/js/motion.js"></script>


<script src="/js/schemes/pisces.js"></script>


<script src="/js/next-boot.js"></script>




  



  <script>
  if (CONFIG.page.isPost) {
    wpac_init = window.wpac_init || [];
    wpac_init.push({
      widget: 'Rating',
      id    : ,
      el    : 'wpac-rating',
      color : 'fc6423'
    });
    (function() {
      if ('WIDGETPACK_LOADED' in window) return;
      WIDGETPACK_LOADED = true;
      var mc = document.createElement('script');
      mc.type = 'text/javascript';
      mc.async = true;
      mc.src = '//embed.widgetpack.com/widget.js';
      var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(mc, s.nextSibling);
    })();
  }
  </script>












  

  

</body>
</html>
